package printStream;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintStream;

public class Dmeo1 {
    public static void main(String[] args) throws FileNotFoundException {
        //字节打印流
        //1.创建对象
        PrintStream ps = new PrintStream(new FileOutputStream("IODemo\\print.txt"));
        //2.输入数据
        ps.println("jack");
        ps.print(true);
        ps.print("hello");
        ps.printf("%s是%s","Jack","coder");
        //3.释放资源
        ps.close();
    }
}
